﻿using System.IO;
using LuaInterface;
using Pandora;
using UnityEngine;

namespace NeatlyEditor
{
    public static class BuilderHelper
    {
        public static void Log(string info)
        {
            var rootPath = Application.dataPath + "/../Native/log";
            var fileName = "error.log";
            var content = PdrFileUtil.ReadTextFromFile(Path.Combine(rootPath, fileName));
            content += $"\n{info}";
            PdrFileUtil.SaveTextToFile(rootPath, "error.log", content);
            Debugger.LogError(info);
        }
    }
}